﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.Caching;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using SalePartial.BLL;
using SalePartial.Model;
using SalePartial.Utility.WebComponents;

public partial class controls_front_DownPopu : System.Web.UI.UserControl
{
    //private SalePartial.BLL.Information infoBll = new SalePartial.BLL.Information();
    private DateTime expireTime = DateTime.Now.AddMinutes(1);

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            bind();
        }
    }

    private void bind()
    {
        string cacheKey = "PopuDownloads";
        if (Cache[cacheKey] != null)
        {
            this.downloadList.DataSource = (IEnumerable)Cache[cacheKey];
        }
        else
        {
            //IList list = infoBll.GetDownListByLimit(10);    //表示父?型?会?下?
            //Cache.Add(cacheKey, list, null, expireTime, TimeSpan.Zero, CacheItemPriority.High, null);
            //this.downloadList.DataSource = list;
        }

        this.downloadList.DataBind();
    }
}
